package org.example.wikwok.pojo;

import java.io.Serializable;
import java.util.List;

public class UserInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    private User user;
    private List<VideoInfo> likedVideos;

    private List<User>likedUpMasters;
    private List<VideoInfo> uploadedVideos;
    long followers;
    long following;

    public UserInfo(User user, List<VideoInfo> likedVideos, List<User> likedUpMasters, List<VideoInfo> uploadedVideos, long followers, long following) {
        this.user = user;
        this.likedVideos = likedVideos;
        this.likedUpMasters = likedUpMasters;
        this.uploadedVideos = uploadedVideos;
        this.followers = followers;
        this.following = following;
    }

    public UserInfo() {
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<VideoInfo> getLikedVideos() {
        return likedVideos;
    }

    public void setLikedVideos(List<VideoInfo> likedVideos) {
        this.likedVideos = likedVideos;
    }

    public List<User> getLikedUpMasters() {
        return likedUpMasters;
    }

    public void setLikedUpMasters(List<User> likedUpMasters) {
        this.likedUpMasters = likedUpMasters;
        for(User user:likedUpMasters){
            user.setPassword("无权限访问");
        }
    }

    public List<VideoInfo> getUploadedVideos() {
        return uploadedVideos;
    }

    public void setUploadedVideos(List<VideoInfo> uploadedVideos) {
        this.uploadedVideos = uploadedVideos;
    }

    public long getFollowers() {
        return followers;
    }

    public void setFollowers(long followers) {
        this.followers = followers;
    }

    public long getFollowing() {
        return following;
    }

    public void setFollowing(long following) {
        this.following = following;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "user=" + user +
                ", likedVideos=" + likedVideos +
                ", likedUpMasters=" + likedUpMasters +
                ", uploadedVideos=" + uploadedVideos +
                ", followers=" + followers +
                ", following=" + following +
                '}';
    }
}
